Optimal. Leaf size=71 \[ \frac {4 i a^4 \log (\sin (c+d x))}{d}+\frac {4 i a^4 \log (\cos (c+d x))}{d}-8 a^4 x-\frac {\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3553, 12, 3541, 3475} \[ \frac {4 i a^4 \log (\sin (c+d x))}{d}+\frac {4 i a^4 \log (\cos (c+d x))}{d}-\frac {\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}-8 a^4 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 3475
Rule 3541
Rule 3553
Rubi steps
\begin {align*} \int \cot ^2(c+d x) (a+i a \tan (c+d x))^4 \, dx &=-\frac {\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}-\int -4 i a^2 \cot (c+d x) (a+i a \tan (c+d x))^2 \, dx\\ &=-\frac {\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}+\left (4 i a^2\right ) \int \cot (c+d x) (a+i a \tan (c+d x))^2 \, dx\\ &=-8 a^4 x-\frac {\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}+\left (4 i a^4\right ) \int \cot (c+d x) \, dx-\left (4 i a^4\right ) \int \tan (c+d x) \, dx\\ &=-8 a^4 x+\frac {4 i a^4 \log (\cos (c+d x))}{d}+\frac {4 i a^4 \log (\sin (c+d x))}{d}-\frac {\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 2.27, size = 151, normalized size = 2.13 \[ \frac {a^4 \csc (c) \sec (c) \csc (c+d x) \sec (c+d x) \left (6 d x \cos (4 c+2 d x)+4 \sin (2 c) \sin (2 (c+d x)) \tan ^{-1}(\tan (5 c+d x))-i \cos (4 c+2 d x) \log \left (\cos ^2(c+d x)\right )+\cos (2 d x) \left (i \log \left (\sin ^2(c+d x)\right )+i \log \left (\cos ^2(c+d x)\right )-6 d x\right )-i \cos (4 c+2 d x) \log \left (\sin ^2(c+d x)\right )+2 \sin (2 d x)\right )}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 57, normalized size = 0.80 \[ \frac {-4 i \, a^{4} + {\left (4 i \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} - 4 i \, a^{4}\right )} \log \left (e^{\left (4 i \, d x + 4 i \, c\right )} - 1\right )}{d e^{\left (4 i \, d x + 4 i \, c\right )} - d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 3.31, size = 163, normalized size = 2.30 \[ -\frac {-8 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) + 32 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right ) - 8 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) - 8 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {-8 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{4}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.31, size = 76, normalized size = 1.07 \[ \frac {4 i a^{4} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {4 i a^{4} \ln \left (\sin \left (d x +c \right )\right )}{d}-8 a^{4} x -\frac {a^{4} \cot \left (d x +c \right )}{d}+\frac {a^{4} \tan \left (d x +c \right )}{d}-\frac {8 a^{4} c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.72, size = 67, normalized size = 0.94 \[ -\frac {8 \, {\left (d x + c\right )} a^{4} + 4 i \, a^{4} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 4 i \, a^{4} \log \left (\tan \left (d x + c\right )\right ) - a^{4} \tan \left (d x + c\right ) + \frac {a^{4}}{\tan \left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.00, size = 63, normalized size = 0.89 \[ \frac {a^4\,\mathrm {tan}\left (c+d\,x\right )}{d}-\frac {a^4\,\mathrm {cot}\left (c+d\,x\right )}{d}-\frac {a^4\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,8{}\mathrm {i}}{d}+\frac {a^4\,\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,4{}\mathrm {i}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.36, size = 51, normalized size = 0.72 \[ \frac {4 i a^{4}}{- d e^{4 i c} e^{4 i d x} + d} + \frac {4 i a^{4} \log {\left (e^{4 i d x} - e^{- 4 i c} \right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________